<?php
/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: DuKe TeAm
 * License Type: Purchased
 */

class Users extends Doctrine_Record {
  public function setTableDefinition() {
    $this->setTableName('users');
    $this->hasColumn('user_id', 'integer', 4, array(
        'type' => 'integer',
        'length' => 4,
        'unsigned' => false,
        'notnull' => true,
        'primary' => true, 
        'autoincrement' => true,
      )
    );
    $this->hasColumn('user_displayname', 'string', 255, array(
        'type' => 'string',
        'length' => 255,
        'fixed' => false,
        'notnull' => false,
      )
    );
    $this->hasColumn('user_password', 'string', 255, array(
        'type' => 'string',
        'length' => 255,
        'fixed' => false,
        'notnull' => false,
      )
    );
    $this->hasColumn('user_email', 'string', 255, array(
        'type' => 'string',
        'length' => 255,
        'fixed' => false,
        'notnull' => true,
      )
    );
    $this->hasColumn('user_firstname', 'string', 255, array(
        'type' => 'string',
        'length' => 255,
        'fixed' => false,
        'notnull' => false,
      )
    );
    $this->hasColumn('user_lastname', 'integer', 4, array(
        'type' => 'integer',
        'length' => 4,
        'unsigned' => false,
        'notnull' => false,
      )
    );
    $this->hasColumn('user_phone', 'string', 255, array(
        'type' => 'string',
        'length' => 255,
        'fixed' => false,
        'notnull' => false,
      )
    );
    $this->hasColumn('user_status', 'integer', 4, array(
        'type' => 'integer',
        'length' => 4,
        'unsigned' => false,
        'notnull' => true,
      )
    );
    $this->hasColumn('user_type', 'integer', 4, array(
        'type' => 'integer',
        'length' => 4,
        'unsigned' => false,
        'notnull' => true,
      )
    );
    $this->hasColumn('user_createdtime', 'timestamp', 0, array(
        'type' => 'timestamp',
        'length' => 0,
        'notnull' => true,
      )
    );
    $this->hasColumn('user_updatedtime', 'timestamp', 0, array(
        'type' => 'timestamp',
        'length' => 0,
        'notnull' => true,
      )
    );
  }
  
  public function setUp() {
    parent::setUp();
    $this->hasMany('Comments as comments', array(
        'local' => 'user_id', 
        'foreign' => 'com_user'
      )
    );
    $this->hasMany('Articles_ratings as articles_ratings', array(
        'local' => 'user_id', 
        'foreign' => 'arat_user'
      )
    );
    $this->hasMany('Sessions as sessions', array(
        'local' => 'user_id', 
        'foreign' => 'ses_user'
      )
    );
    $this->hasMany('User_informations as user_informations', array(
        'local' => 'user_id', 
        'foreign' => 'uinfo_user'
      )
    );
    $this->hasMany('Checkout as checkout', array(
        'local' => 'user_id', 
        'foreign' => 'user_id'
      )
    );
  }
  
}

?>
